#include <iostream>

using namespace std;

int main(void)
{
    //倒置
    int i;

    cout << "输入：" << endl;

    int arr[] = {1, 2, 3, 4, 5, 6, 7};

    int start = 0;
    int end = sizeof(arr) / sizeof(arr[0]) - 1;

    for (i = 0; i < 7; i++)
    {
        cout << "第" << i + 1 << "个数字是：" << arr[i] << endl;
    }

    cout << "输出：" << endl;

    int exchange;

    while(start < end)
    {
        exchange = arr[start];
        arr[start] = arr[end];
        arr[end] = exchange;
        start++;
        end--;
    }

    for (i = 0; i < 7; i++)
    {
        cout << "第" << i + 1 << "个数字是：" << arr[i] << endl;
    }

    return 0;
}